package cn.simple.run;

import com.intellij.execution.configurations.ConfigurationFactory;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.openapi.components.BaseState;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class SimpleConfigurationFactory extends ConfigurationFactory {

    public static SimpleConfigurationFactory INSTANCE = new SimpleConfigurationFactory();

    public SimpleConfigurationFactory() {
        super(SimpleConfigurationType.INSTANCE);
    }

    @Override
    public @NotNull RunConfiguration createTemplateConfiguration(@NotNull Project project) {
        return new SimpleConfiguration(this, project);
    }

    @Override
    public @NotNull @NonNls String getId() {
        return "http";
    }

    @Override
    public @Nullable Class<? extends BaseState> getOptionsClass() {
        return SimpleRunConfigurationOptions.class;
    }
}
